import { Button, FlatList, ScrollView, StyleSheet, Text, View } from 'react-native';
import StackNavigation from '../Components/StackNavigation';
import TabNavigation from '../Components/TabNavigation';
import MaterialIcons  from 'react-native-vector-icons/MaterialIcons';
import chatListData from '../api/data';
import { Avatar, List } from 'react-native-paper';



export default function ChatListPage ({navigation}){

  const dataList = chatListData

    return(
      <View>
        <ScrollView>
        {dataList.map(item=>(
           <List.Item
           style={{padding:8}}
           title={item.name}
           description={item.say}
           key={item.name}
           left={props => <Avatar.Text size={24} label='XD' />}
           onPress={()=>{ navigation.navigate('Detile',{user:item}) }}
           />
        ))}
      </ScrollView>
      </View>
    )
}



 